# People
# 类属性  用来记录 创建了多少个实例

# 类方法  属于这个类,   写法 和 调用

class Cat:

    def __init__(self, color):
        self.color = color

    def sing(self):
        print('-------miaomiaomiao-----')


# 静态方法
class People:
    count = 0

    def __init__(self):
        People.count += 1

    def show(self, cat):
        cat.sing()
        print(cat.color)
        print(People.count)

    @classmethod
    def show_count(cls, cat):  # class
        cat.sing()
        print(cat.color)
        print(cls.count)

    @staticmethod
    def show_info():
        print('我啥也没有....')


p1 = People()
p2 = People()
p3 = People()
p4 = People()
p5 = People()

# p2.show()

# 类名.类方法

# People.show_count()
# People.show_info()

p1.show_info()

cat = Cat('黑猫')
cat1 = Cat('白猫')

p1.show(cat)

People.show_count(cat1)
